<template>

	<div style="width: 1100px;">

		<el-breadcrumb separator="/">
			<el-breadcrumb-item :to="{  path: '/adminHome' }">首页</el-breadcrumb-item>
			<el-breadcrumb-item><a href="/adminHome">业务审核</a></el-breadcrumb-item>
			<el-breadcrumb-item>菜单维护</el-breadcrumb-item>
		</el-breadcrumb>

		<el-card class="box-card" style="width: 1200px; margin-top: 1.875rem; margin-right: -100px;">
			<div style="float: left; margin-top:1.875rem ;">
				<el-input type="txte" v-model="queryInfo.typeId" placeholder="认证状态" style="width: 200px;height: 50px;">
				</el-input>
				<el-button type="primary" icon="el-icon-search" @click="queryAll">查询</el-button>
			</div>


			<el-table :data="tableData" border style="width: 100%">

				<el-table-column prop="typeId" label="项目类型">
				</el-table-column>
				<el-table-column prop="userId" label="用户ID">
				</el-table-column>
				<el-table-column prop="realName" label="真实姓名">
				</el-table-column>
				<el-table-column prop="phoneNumber" label="电话号">
				</el-table-column>
				<el-table-column prop="isRenZheng" label="认证状态">
					<template slot-scope="scope">
						<span v-if="scope.row.isRenZheng==1">待认证</span>
						<span v-if="scope.row.isRenZheng==2">通过认证</span>
						<span v-if="scope.row.isRenZheng==3">认证失败</span>
					</template>
				</el-table-column>



				<el-table-column label="操作" width="200px">
					<template slot-scope="scope">
						<el-tooltip class="item" effect="dark" content="通过认证" placement="top-start">
							<el-button type="success" icon="el-icon-finished" @click="zhifu">
							</el-button>
						</el-tooltip>

					</template>

				</el-table-column>
			</el-table>


			<!-- 分页 -->

			<el-pagination @current-change="handleCurrentChange" :current-page="queryInfo.pageNum"
				:page-sizes="[1, 4, 8, 10]" :page-size="3" layout="total, prev, pager, next, jumper" :total="total">
			</el-pagination>


		</el-card>
	</div>
</template>
<script>
	export default {
		data() {
			return {
				tableData: [],
				queryInfo: {
					pageNum: 1,
					typeId: '',
					total: 0
				},
			}
		},
		methods: {
			//支付
			async zhifu(){
				var res=await this.$http.get('/alipay')
			},

			//查询全部
			async queryAll() {

				var param = new URLSearchParams();
				param.append('pageNum', this.queryInfo.pageNum)
				param.append('typeId', this.queryInfo.pageNum)
				var res = await this.$http.post('querySmrzAll', param)
				this.tableData = res.data.data.list
				this.total = res.data.data.total
				console.log(res.data.data.list)
			},
			// 页码大小
			handleSizeChange(val) {
				console.log(`每页 ${val} 条`);
			},
			// 页码变动
			handleCurrentChange(val) {
				this.queryInfo.pageNum = val;
				this.queryAll();
			}

		},
		async mounted() {
			this.queryAll()

		}
	}
</script>

<style>
</style>
